<!--
 * @Author: 詹真琦(legendryztachi@gmail.com)
 * @Date: 2021-11-15 15:21:34
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-11-26 11:45:11
 * @FilePath: \code\cwp-front\pc-collaboration\src\components\accessory-item\components\name-element.vue
 * @Description: 根据场景不同生成不同的元素
-->
<template>
    <div class="name-element">
        <!-- 正在上传 -->
        <div v-if="file.isUploading"><a>{{ file.filename }}</a></div>
        <!-- 下载 -->
        <download-att :file="file" v-else>
            {{ file.filename }}
        </download-att>
    </div>
</template>
<script>
    import DownloadAtt from './download-att.vue';
    export default {
        name: 'NameElement',
        components: {
            DownloadAtt,
        },
        props: {
            file: {
                type: Object,
            },
        },
    };
</script>
<style lang="scss" scoped></style>
